#!/bin/bash

# fail on errors
set -e
# be verbose
set -x

# Do not run these tests if we are already inside a container
if [ -e "/.dockerenv" ] || (grep -q docker /proc/self/cgroup &>/dev/null); then
       echo "We are running in a container, skipping ..."
       exit 0
fi

for OS in centos7 tumbleweed
do
	echo
	echo "Checking package build for ${OS} ...."
	echo
	buildlib/cbuild build-images ${OS}
	buildlib/cbuild pkg --use-prebuilt-pandoc ${OS}
done
